const mysql = require('mysql2');
module.exports = (req, res, next) => {
    const conn = mysql.createConnection({
        host: '47.98.138.5',//主机
        port: '3306',//端口
        user: 'root',//用户
        password: '',//密码
        database: 'lcf172'//数据库
    });
    req.db = conn
    next();
}